package com.fcscs.cservice.gwt.client;

import java.util.Date;
import java.util.List;

import com.fcscs.cservice.domain.InRoomCategory;
import com.fcscs.cservice.domain.InRoomItem;
import com.fcscs.cservice.domain.InRoomMenu;
import com.fcscs.cservice.domain.model.CategoryView;
import com.fcscs.cservice.domain.model.EntityVersionView;
import com.fcscs.cservice.domain.model.InRoomMenuModel;
import com.fcscs.cservice.domain.model.ItemView;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

@RemoteServiceRelativePath("../gwt/ecmsInRoomMenu")
public interface ECMSInRoomMenuService extends RemoteService {
	
	InRoomCategory getInRoomCategory(long id, int level);

 	List<InRoomMenuModel> getInRoomMenuModels(long propId);

 	boolean saveInRoomMenuModels(long propId, List<InRoomMenuModel> menu) ;
	
	List<InRoomCategory> getInRoomCategoryList(long orgId, long propId, int level, boolean isCurrent); //isCurrent true: current; false: scheduled

	List<InRoomCategory> getInRoomCategoryList(long orgId, long propId, long versionId, int level); //get specified version data

	List<InRoomCategory> saveInRoomCategoryList(List<InRoomCategory> catList, int level); //used to save display order

	InRoomCategory createInRoomCategory(InRoomCategory cat);

	InRoomCategory saveInRoomCategory(InRoomCategory cat);
	
	boolean deleteInRoomCategory(InRoomCategory cat);

	void permDeleteInRoomCategory(InRoomCategory cat);

	boolean isInRoomCategoryTaken(long orgId, long propId, String name, Long id, long versionId, int level);
	
	List<CategoryView> getCategoryViewList(long orgId, long propId, Long parentCategoryId, List<Long> categoryIdList); //used by web service, get current version

	InRoomItem getInRoomItem(long id);
	
	List<InRoomItem> getInRoomItemList(long orgId, long propId, boolean isCurrent); //isCurrent true: current; false: scheduled

	List<InRoomItem> getInRoomItemList(long orgId, long propId, long versionId); //get specified version data

	List<InRoomItem> saveInRoomItemList(List<InRoomItem> itemList); //used to save display order

	InRoomItem createInRoomItem(InRoomItem item);

	InRoomItem saveInRoomItem(InRoomItem item);
	
	boolean deleteInRoomItem(InRoomItem item);

	boolean isInRoomItemTaken(long orgId, long propId, String name, Long id, long versionId);
	
	List<ItemView> getInRoomItemViewList(long orgId, long propId, Long parentCategoryId, List<Long> itemIdList); //used by web service, get current version
	
	List<EntityVersionView> findInRoomItemViewList(long orgId, long propId, Date deliveryTime, String term); //used by web service

	InRoomMenu getInRoomMenu(long id);
	
	List<InRoomMenu> getInRoomMenuList(long orgId, long propId, boolean isCurrent); //isCurrent true: current; false: scheduled

	List<InRoomMenu> getInRoomMenuList(long orgId, long propId, long versionId); //get specified version data

	List<InRoomMenu> saveInRoomMenuList(List<InRoomMenu> menuList); //used to save display order

	InRoomMenu createInRoomMenu(InRoomMenu menu);

	InRoomMenu saveInRoomMenu(InRoomMenu menu);
	
	boolean deleteInRoomMenu(InRoomMenu menu);

	boolean isInRoomMenuTaken(long orgId, long propId, String parentType, Long parentId, String descendantType, Long descendantId, Long id, long versionId);


}
